<?php
class Report_Form_MasterInventory extends ZendX_JQuery_Form
{
	public function __construct(Zend_Controller_Action $controller)
	{		
		$this->setMethod("get");
		
		//inbound_create_time_a
		$inbound_create_time_a = new Itvina_JQuery_Form_Element_DatePicker ( 'inbound_create_time_a' ,array('jQueryParams' => array('dateFormat' => 'd.m.yy')));
		$inbound_create_time_a
		->setLabel ( "Từ ngày (A)" )
		//->setDescription ( $controller->getHelper('common')->getDescription('inbound_create_time' ))
		;
		
		//inbound_create_time_b
		$inbound_create_time_b = new Itvina_JQuery_Form_Element_DatePicker ( 'inbound_create_time_b' ,array('jQueryParams' => array('dateFormat' => 'd.m.yy')));
		$inbound_create_time_b
		->setLabel ( "Đến ngày (B)" )
		//->setDescription ( $controller->getHelper('common')->getDescription('inbound_create_time' ))
		;
		
		//inbound_detail_product_code
		$inbound_detail_product_code=$this->createElement ( 'select', 'inbound_detail_product_code' )
		->setDescription ( 
		"<br/><br/>"
		.$controller->view->partial("index/manage/submit.phtml",'admin',array('value'=>'Tìm kiếm thông tin','onclick'=>"$('#adminForm').submit();")))
		;
		
		//product_group_code
		$product_group_code=$this->createElement ( 'select', 'product_group_code' )
		//->setDescription ( $controller->getHelper('common')->getDescription('inbound_order_code' ))
		;
		
		//unit_code
//		$unit_code=$this->createElement ( 'select', 'unit_code' )
//		->setLabel ( "Đơn vị qui đổi của BC")
//		->setRequired(true)
//		->setDescription($controller->getHelper('common')->getDescription($unit_code) )
//		;
		
		$this->addElements ( array (
			//$unit_code,
			$inbound_create_time_a,
			$inbound_create_time_b,
			$product_group_code,
			$inbound_detail_product_code,
		) );	
		
		$controller->getHelper ( 'common' )->form ( $this );
	}
}